let evs = [8,9,0];
console.log(evs.map(v=>v*2+1));
// (v,i):i is an index
console.log(evs.map((v,i)=>v+i));
// Statement bodies
let nums = [3,5,15,0,4],fives =[];
nums.forEach(v => {
  if (v % 5 === 0)
    fives.push(v);
});
console.log(fives)

// Lexical this
var bob = {
  _name: "Bob",
  _friends: ['sever'],
  printFriends() {
    this._friends.forEach(f =>
      console.log(this._name + " knows " + f));
  }
};
bob.printFriends();

// Lexical arguments
function square() {
  let example = () => {
    let numbers = [];
    for (let number of arguments) {
      numbers.push(number * number);
    }

    return numbers;
  };

  return example();
}

console.log(square(2, 4, 7.5, 8, 11.5, 21));
